<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示</title>
	<style>
        html,body{
            background:transparent;
        }
		/* 弹框 */
		.tk{
			width: 100%;
			height: 100vh;
			position: fixed;
			top: 0;
			left: 0;
			z-index: 100;
			display: flex;
			align-items: center;
			justify-content: center;
		}
		.tk-hide{
			display: none !important;
		}
		.tk .bg {
			background: rgba(0, 0, 0, 0.4);
			width: 100%;
			height: 100vh;
			position: fixed;
			top: 0;
			left: 0;
			z-index: 101;
		}
		.tk .tk-box{
			width: 5.296296rem;
			height: 3.5rem;
			background-color: #FFFFFF;
			z-index: 102;
			border-radius: 0.222222rem;
			display: flex;
			flex-direction: column;
		}
		.tk .tk-item{
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: flex-start;
		}
		.tk .right{
			justify-content: flex-end;
		}
		.tk .tk-item .name{
			margin-left: 0.37037rem;
			margin-right:0.185185rem;
			display:flex;
			align-items:center;
		}
		.tk .tk-item .value{
			flex:1;
			display:flex;
			margin-right:0.185185rem;
		}
		.tk .tk-item .xq{
			margin-right: 0.37037rem;
			color: #2e45ca;
		}
		
		.hide{
			display: none !important;
		}
		.zwzf{
			color: #FFFFFF !important;
		}
    </style>
</head>

<body>
	<div class="tk">
		<div class="bg"></div>
		<div class="tk-box">
			<div class="tk-item">
				<div class="name">档案类别:</div>
				<div class="value" span id="dalb"></div>
			</div>
			<div class="tk-item zgf hide">
				<div class="name">小区名称:</div>
				<div class="value" span id="xq"></div>
			</div>
			<div class="tk-item jzw hide">
				<div class="name">建筑名称:</div>
				<div class="value" span id="jzmc"></div>
			</div>
			<div class="tk-item jxmd hide">
				<div class="name">单位名称:</div>
				<div class="value" span id="dw"></div>
			</div>
			<div class="tk-item qy hide">
				<div class="name">企业名称:</div>
				<div class="value" span id="qymc"></div>
			</div>
			<div class="tk-item">
				<div class="name">具体地址:</div>
				<div class="value" span id="dz"></div>
			</div>
			<div class="tk-item zgf hide">
				<div class="name">用<span class="zwzf">占位</span>途:</div>
				<div class="value" span id="yt"></div>
			</div>
			<div class="tk-item jzw hide">
				<div class="name">产权性质:</div>
				<div class="value" span id="cqxz"></div>
			</div>
			<div class="tk-item jzw hide">
				<div class="name">层<span class="zwzf">占位</span>数:</div>
				<div class="value" span id="cs"></div>
			</div>
			<div class="tk-item jxmd hide">
				<div class="name">类<span class="zwzf">占位</span>别:</div>
				<div class="value" span id="lb"></div>
			</div>
			<div class="tk-item right">
				<span class="xq">详情></span>
			</div>
		</div>
	</div>
	<script src="js/jquery-3.0.0.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/flexible.js" type="text/javascript" charset="utf-8"></script>
	<script>
		document.addEventListener('plusready', function(){
			
		});
		
		function getUrlParams(name) { // 不传name返回所有值，否则返回对应值
		    var url = window.location.search;
		    if (url.indexOf('?') == 1) { return false; }
		    url = url.substr(1);
		    url = url.split('&');
		    var name = name || '';
		    var nameres;
		    // 获取全部参数及其值
		    for(var i=0;i<url.length;i++) {
		        var info = url[i].split('=');
		        var obj = {};
		        obj[info[0]] = decodeURI(info[1]);
		        url[i] = obj;
		    }
		    // 如果传入一个参数名称，就匹配其值
		    if (name) {
		        for(var i=0;i<url.length;i++) {
		            for (const key in url[i]) {
		                if (key == name) {
		                    nameres = url[i][key];
		                }
		            }
		        }
		    } else {
		        nameres = url;
		    }
		    // 返回结果
		    return nameres;
		}
		
		//alert(location.href);
		// var huabanObj = sessionStorage['huabanObj']?JSON.parse(sessionStorage['huabanObj']):{};
		// console.log(huabanObj);
		function getGoodStr(str){
			if(str||str===0){
				if(str=='null'||str=='undefined'){
					return '';
				}else{
					return str+'';
				}
			}else{
				return '';
			}
		}
		$('#xq').html(getGoodStr(getUrlParams('xq')));
		$('#jzmc').html(getGoodStr(getUrlParams('jzmc')));
		$('#dw').html(getGoodStr(getUrlParams('dw')));
		$('#qymc').html(getGoodStr(getUrlParams('qymc')));
		$('#dz').html(getGoodStr(getUrlParams('dz')));
		$('#yt').html(getGoodStr(getUrlParams('yt')));
		$('#cqxz').html(getGoodStr(getUrlParams('cqxz')));
		var cs = getGoodStr(getUrlParams('cs'));
		if(cs||cs===0){
			if(cs>=10){
				cs = '高层建筑';
			}else{
				cs = '一般建筑';
			}
		}
		$('#cs').html(cs);
		$('#lb').html(getGoodStr(getUrlParams('lb')));
		var cx_type = getGoodStr(getUrlParams('cx_type'));
		var dalb = '';
		if(cx_type=='zgf'){
			$('#dalb').html('住改非');
			$('.zgf').removeClass('hide');
		}else if(cx_type=='jzw'){
			$('#dalb').html('建筑物');
			$('.jzw').removeClass('hide');
		}else if(cx_type=='jxmd'){
			$('#dalb').html('九小门店');
			$('.jxmd').removeClass('hide');
		}else if(cx_type=='qy'){
			$('#dalb').html('企业');
			$('.qy').removeClass('hide');
		}
		
		$('.bg').on('click',function(){
			//利用iframe的onload事件刷新页面
			document.title = '关闭'; 
			var iframe = document.createElement('iframe');
			iframe.style.visibility = 'hidden'; 
			iframe.style.width = '1px'; 
			iframe.style.height = '1px'; 
			iframe.onload = function () { 
				setTimeout(function () {
					document.body.removeChild(iframe); 
				}, 0); 
			}; 
			document.body.appendChild(iframe);
		});
		$('.xq').on('click',function(){
			//利用iframe的onload事件刷新页面 
			document.title = '跳转'; 
			var iframe = document.createElement('iframe');
			iframe.style.visibility = 'hidden'; 
			iframe.style.width = '1px'; 
			iframe.style.height = '1px'; 
			iframe.onload = function () { 
				setTimeout(function () {
					document.body.removeChild(iframe); 
				}, 0); 
			}; 
			document.body.appendChild(iframe);
			//plus.webview.close("sub");
		});

    </script>
</body>

</html>